<!DOCTYPE html>
<html lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <meta name="keywords" content="个人中心" />
    <meta name="description" content="个人中心" />
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width,viewport-fit=cover">
    <!--<link th:href="@{/shoppingApi/css/weui.min.css}" rel="stylesheet">-->
    <!--<link th:href="@{/shoppingApi/css/jquery-weui.min.css}" rel="stylesheet">-->
    <link th:href="@{/shoppingApi/css/public.css}" rel="stylesheet">
    <link th:href="@{/shoppingApi/css/usercenter.css}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" th:href="@{/shoppingApi/css/weui.min.css}">
    <script type="text/javascript" th:src="@{/shoppingApi/js/jquery-3.3.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/shoppingApi/js/jquery-weui.min.js}"></script>
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <meta name="_csrf_header"  th:content="${_csrf.headerName}"/>
    <style>
        .weui-actionsheet__menu {
            height: 136px;
            overflow: auto;
        }
        .weui-actionsheet__cell {
            font-size: 14px;
            padding: 6px 0;
        }
        .user-login{
            font-size:16px;
        }
    </style>

</head>
<body>
<div class="main usercenter">
    <div class="main_con c323232">
        <div class="rela">
            <img class="w100" th:src="@{/shoppingApi/images/userbg.png}">
            <div class="abs title flex flex-ac pl15 pr15">
                <span class="rela">
                    <img class="userpic mr15" th:src="@{/shoppingApi/images/userpic.png}">
                    <!--<span class="name abs"></span>-->
                    <span class="name abs" th:if="${map!=null}" th:text="${map.userRank.rankname}"></span>
                </span>
                <div class="user-no">
                    <!--<p class="ft17 cfff000 mb5"><i>会员号：</i><i  th:if="${map!=null}" th:text="${map.userNo.userNo}"></i></p>-->
                    <!--<p class="rela">-->
                        <!--<span class="ft17 cfff bold"  th:if="${map!=null}" th:text="${map.userNo.name}"></span>-->
                        <!--<span id="show-actions" class="ft13 cfff changuser ml20">切换账号</span>-->
                        <!--<span class="account abs ftc cfff ft15" style="display: none">-->
                        <!--<span ></span>-->
                        <!--<span id="show-action">添加账号＋</span>-->
                        <!--</span>-->
                    <!--</p>-->
                    <p class="usercenter-login" th:if="${userNo==null}" style="color: white">登录
                    <p th:if="${userNo!=null}" ><span>账号：</span><span class="userNo-val" th:text="${userNo}"></span></p>
                    <p  th:if="${userNo!=null}"  class="ft17 cfff000 mb5 user-login"><i style="color: white">切换账号</i><i style="color: white">&gt;</i></p></p>
                    <!--<select class="changUserNo">-->

                    <!--</select>-->
                </div>
                <input class="login-phone"  type="hidden" name="phone" value="">

                <!--<span class="abs usermess">-->
                    <!--<a ><img th:src="@{/shoppingApi/images/usermess.png}"></a>-->
                    <!--<span class="num abs ft12" ></span>-->
                <!--</span>-->
            </div>
        </div>
        <div class="card ml15 mr 15 bgfff">
            <p class="title pl15 pr15 rela">
                <span class="ft15 c323232 bold">全部订单</span>
                <a class="fr">
                    <span class="ft14 c969696 arrow mr10">查看全部</span>
                </a>
            </p>
            <ul class="flex pt15 pb15 ftc ft14 w100">
                <li class="it1 active">
                    <a class="db" >
                        <img th:src="@{/shoppingApi/images/user1.png}">
                        <p>待付款</p>
                    </a>
                </li>
                <li class="it1">
                    <a class="db" >
                        <img th:src="@{/shoppingApi/images/user2.png}">
                        <p>待发货</p>
                    </a>
                </li>
                <li class="it1">
                    <a class="db" >
                        <img th:src="@{/shoppingApi/images/user3.png}">
                        <p>待收货</p>
                    </a>
                </li>
                <li class="it1">
                    <a class="db" >
                        <img th:src="@{/shoppingApi/images/user4.png}">
                        <p>待评价</p>
                    </a>
                </li>
            </ul>
        </div>
        <ul class="cardtwo flex flex-ac ftc ft14 c323232 bgfff mt15 mb15 pt15">
            <li class="it1">
                <a class="db">
                    <p><span class="nft10">￥</span>0.00</p>
                    <p class="rela">今日收益<span></span></p>
                </a>
            </li>
            <li class="it1">
                <a class="db" >
                    <p><span class="nft10">￥</span>0.00</p>
                    <p class="rela">本周收益<span></span></p>
                </a>
            </li>
            <li class="it1">
                <a class="db">
                    <p><span class="nft10">￥</span>0.00</p>
                    <p class="rela">本月收益<span></span></p>
                </a>
            </li>
            <!--<li class="it1 active">-->
            <li class="it1 mywallet">
                <p>
                    <img th:src="@{/shoppingApi/images/user5.png}">
                </p>
                <p class="my">我的钱包</p>
            </li>
        </ul>
        <div class="yun c323232 bgfff pl15 pr15 mb15">
            <p class="title ft15 bold">我的云库</p>
            <ul class="flex pt15 pb15 ftc flex-wrap ft14 c323232">
                <li id="myrecord">
                    <img th:src="@{/shoppingApi/images/userpic1.png}">
                    <p>我的推荐</p>
                </li>
                <li id="goodscollect">
                    <img th:src="@{/shoppingApi/images/userpic2.png}">
                    <p>商品收藏</p>
                </li>
                <li id="mycomment">
                    <img th:src="@{/shoppingApi/images/userpic3.png}">
                    <p>我的评价</p>
                </li>
                <li id="myaddress">
                    <img th:src="@{/shoppingApi/images/userpic4.png}">
                    <p>地址管理</p>
                </li>
                <li id="accountseting">
                    <img th:src="@{/shoppingApi/images/userpic5.png}">
                    <p>账户设置</p>
                </li>
                <li id="severcentter">
                    <a class="db" >
                        <img th:src="@{/shoppingApi/images/userpic6.png}">
                        <p>客服中心</p>
                    </a>
                </li>
            </ul>
        </div>
        <div class="fixedBox50">
            <ul class="fixed-bottom bottom flex flex-pc ftc bgfff nft10 c323232">
                <li class="it1">
                    <a th:href="@{'/wap/productIndex'}" class="db">
                        <span class="img"></span>
                        <span>首页</span>
                    </a>
                </li>
                <li class="it1">
                    <a th:href="@{'/wap/selectProductYJAndRjClassfy'}" class="db">
                        <span class="img"></span>
                        <span>分类</span>
                    </a>
                </li>
                <li class="it1">
                    <a th:href="@{'/wap/getCartList'}" class="db">
                        <span class="img"></span>
                        <span>购物车</span>
                    </a>
                </li>
                <li class="it1 active db">
                    <a>
                        <span class="img"></span>
                        <span>我的</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--<div class="weui-mask weui-actions_mask"></div>-->
<!--<div  class="weui-actionsheet" id="weui-actionsheet">-->
    <!--<div class="weui-actionsheet__title"><p class="weui-actionsheet__title-text">选择账号</p></div>-->
    <!--<div class="weui-actionsheet__menu" style="max-height: 136px;">-->
        <!--<div class="weui-actionsheet__cell change" ></div>-->
    <!--</div>-->
    <!--<div class="weui-actionsheet__action">-->
        <!--<div class="weui-actionsheet__cell  color-warning" >添加账号+</div>-->
        <!--<div class="weui-actionsheet__cell weui-actionsheet_cancel">取消</div>-->
    <!--</div>-->
<!--</div>-->
</body>

<script>
$(function () {
    //$.toast("您还没有登录，请登录!", 4000);
    // $.toast("请登录!",2000, function() {
    //     window.location="/wap/openLoginByPhone";
    // });
    //window.location="/wap/openLoginByPhone";
    $('.userpic').on('click',function () {
        window.location="/wap/openLoginPwd";
    })
    $('ul li').on('click',function () {
        window.location="/wap/openLoginPwd";
    })
    $('.rela .fr').on('click',function () {
        window.location="/wap/openLoginPwd";
    })
});
   // $('.user-login').on('click',function () {
   //     //切换账号
   //    $.ajax({
   //        url:'/wap/changeUserNo',
   //        success:function (result) {
   //            $('.user-login').remove();
   //              $.each(result.userNoList,function (i,item) {
   //                  var str='<option value="i">'+item.userNo+'</opotin>';
   //                  $('.changUserNo').append(str);
   //              })
   //        }
   //    })
   // })
       //点击登录
    $('.usercenter-login').on('click',function () {
        window.location.href="/wap/openLoginPwd";
    })

   var userNo;
//切换账号更新账号
$('.user-no').on('change','.changUserNo',function () {
   userNo=$('option:selected').text();
    $('.userNo-val').html(userNo);

    $('.changUserNo').remove();
    $.ajax({
        url:'/wap/changeUserNoByPhoneLogin?userNo='+userNo,
        success:function (result) {

            // alert("切换成功！");
        }
    })

})

   //我的钱包
 // $('.mywallet').on('click',function () {
 //        var userNo1=$('.userNo-val').html();
 //     window.location.href="/wap/mywallet?userNo="+userNo1;
 //
 //    // $.ajax({
 //    //     url:'/wap/mywallet?userNo='+userNo,
 //    //     success:function (result) {
 //    //
 //    //        // window.location.href='/wap/mywallet';
 //    //         alert("查询余额！");
 //    //     }
 //    // })
 // });


/*页面加载获取默认当前的编号的数据*/
   // $(function () {
   //    var userNo= $('.userNo-val').html();
   //    if(userNo==null){
   //        alert('请用户编号登录!');
   //    }else{
   //        window.location.href="/wap/mywallet?userNo="+userNo;
   //    }
   //
   // })

</script>
</html>